<template>
  <div>
    <el-form-item label="结算方式">
      <el-radio-group v-model="formInline.radio1" size="mini">
        <el-radio-button label="1">酬金制</el-radio-button>
      </el-radio-group>
    </el-form-item>
    <el-form-item label="接单">
      <el-radio-group v-model="formInline.radio2" size="mini">
        <el-radio-button label="1">指派</el-radio-button>
        <el-radio-button label="2">抢单</el-radio-button>
      </el-radio-group>
    </el-form-item>
    <el-table v-show="formInline.radio2 === '1'" :data="tableData" border size="mini" style="width: 100%">
      <el-table-column prop="date" label="工种" width="180" />
      <el-table-column prop="name" label="单人酬金（元）" width="180">
        <template slot-scope="scope">
          <div>
            <el-input v-model="scope.row.name" type="text" />
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="人数（人）">
        <template slot-scope="scope">
          <div>
            <el-input v-model="scope.row.name" type="text" />
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="操作">
        <template slot-scope="scope">
          <div>
            <el-button type="text" @click="handleClick(scope.row)">指派</el-button>
          </div>
        </template>
      </el-table-column>
    </el-table>
    <el-form-item v-show="formInline.radio2 === '2'" label="工种设置">
      <el-table :data="tableData" border size="mini" style="width: 100%">
        <el-table-column prop="date" label="工种" width="180" />
        <el-table-column prop="name" label="单人酬金（元）" width="180">
          <template slot-scope="scope">
            <div>
              <el-input v-model="scope.row.name" type="text" />
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="address" label="人数（人）">
          <template slot-scope="scope">
            <div>
              <el-input v-model="scope.row.name" type="text" />
            </div>
          </template>
        </el-table-column>
      </el-table>
    </el-form-item>
    <el-button type="text" icon="el-icon-plus">添加工种</el-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [{ name: 1 }],
      formInline: {
        radio1: '1',
        radio2: '1'
      }
    }
  },
  methods: {
    handleClick() {

    }
  }
}
</script>
